package cn.com.surker.production.entity.vo;

import cn.com.surker.enums.ICodeDescEnum;
import cn.com.surker.enums.production.car.CarWorkStatusEnum;
import cn.com.surker.enums.system.CarFuelEnum;
import cn.com.surker.production.entity.PumpDevice;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @author luotao
 * @date 2024/10/15
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class PumpDeviceVo extends PumpDevice {

	/**
	 * 泵送类型
	 */
	private String pumpTypeName;

	/**
	 * 泵送规格
	 */
	private String pumpNormName;

	/**
	 * 工作状态
	 */
	private String workStatusTxt;

	public String getWorkStatusTxt() {
		Integer workStatus = getWorkStatus();
		CarWorkStatusEnum anEnum = ICodeDescEnum.getEnum(CarWorkStatusEnum.class, workStatus);
		if (anEnum != null) {
			return anEnum.getDescription();
		} else {
			return "";
		}
	}

	/**
	 * 燃油类型
	 */
	private String fuelTypeTxt;

	public String getFuelTypeTxt() {
		Integer fuelType = getFuelType();
		CarFuelEnum anEnum = ICodeDescEnum.getEnum(CarFuelEnum.class, fuelType);
		if (anEnum != null) {
			return anEnum.getDescription();
		} else {
			return "";
		}
	}

}
